public class VarParamenterExercise {
    public static void main(String[] args) {
        HspMethod hspMethod = new HspMethod();
        System.out.println(hspMethod.showScore("make", 70, 60));
        System.out.println(hspMethod.showScore("make", 70, 60, 80));
        System.out.println(hspMethod.showScore("make", 70, 60, 80, 100, 78));
    }
}
class HspMethod {
    public String showScore(String name, double... score) {
        double sumSocre = 0;
        for (int i = 0; i < score.length; i++) {
            sumSocre += score[i];
        }
        return "姓名：" + name + "，总成绩：" + sumSocre;
    }
}
